<?php
namespace Admin\Form;

use Zend\Form\Form;

class CategoryForm extends Form
{
	public function __construct($name = null) {
		parent::__construct('category');
		$this->setAttribute('method', 'post');
		$this->add(array(
			'name'	=> 'id',
			'attributes'	=> array(
				'type'	=> 'hidden',
			),
		));
		
		$this->add(array(
			'name'	=> 'name',
			'attributes'	=> array(
				'type'	=> 'text',
			),
			'options'	=> array(
				'label'	=> 'Name',
			)
		));
		
		$this->add(array(
			'name'	=> 'desc',
			'attributes'	=> array(
				'type'	=> 'text',
			),
			'options'	=> array(
				'label'	=> 'Description',
			),
		));
		
		$this->add(array(
			'name'	=> 'submit',
			'attribute'	=> array(
				'type'	=> 'submit',
				'value'	=> 'Go',
				'id'	=> 'submitbutton',
			)
		));
	}
}